package com.kavin.collection.es;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.DateFormat;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.Date;

/**
 * 订单表(即接单表)
 *
 * @Date 2021-09-17
 */


//shards 分片数  replicas 副本数
@Document(indexName = "match", shards = 2, replicas = 2)
@Data
public class TabMatchSection {


    @Id
    private String id;
    @Field(name = "match_id",type = FieldType.Keyword)
    private String matchId;
    @Field(name = "section_no",type = FieldType.Keyword)
    private Integer sectionNo;
    @Field(name = "section_type",type = FieldType.Keyword)
    private Integer sectionType;
    @Field(name = "section_content",type = FieldType.Text,analyzer = "ik_max_word",searchAnalyzer = "ik_max_word")
    private String  sectionContent;
    @Field(name = "creator_id",type = FieldType.Keyword)
    private String creatorId;
    @Field(name = "create_time",format= DateFormat.custom,pattern = "yyyy-MM-dd HH:mm:ss",type= FieldType.Date)
    private Date createTime;
}
